//字符串逆序

int my_strlen(char* str)
{
    int count = 0;
    while (*str != '\0')
    {
        count++;
        str++;
    }
    return count;
}

void reverase(char* str)
{
    int len = my_strlen(str);
    int left = 0;
    int right = len - 1;
    while (left < right)
    {
        char tmp = *(str+left);
        *(str + left) = *(str + right);
        *(str + right) = tmp;
        left++;
        right--;
    }
}
//digui
/*void reverase2(char* str)
{
    int len = my_strlen(str);
    char tmp = *str;
    *str = *(str + len - 1);
    *(str + len - 1) = '\0';
    if(my_strlen(str+1)>1)
        reverase2(str + 1);
    *(str + len - 1) = tmp;
}*/


int main()
{
    char ch[10000] = { 0 };
    gets(ch);
    reverase(ch);
    printf("%s\n", ch);

    return 0;
}





//喝汽水，1瓶汽水1元，2个空瓶可以换一瓶汽水，给20元，可以多少汽水（编程实现）

//法一
int sum = 0;
int remainder = 0;

void GetNumber(int n)
{
	if (remainder > 1)
	{
		n += remainder / 2;
		remainder %= 2;
	}
	sum += n;
	remainder += n % 2;
	if (remainder > 1)
	{
		n += remainder / 2;
		remainder %= 2;
	}
	if (n/2)
		GetNumber(n/2);
	return;
}

int main()
{
	int n = 0;
	scanf("%d", &n);
	GetNumber(n);
	printf("%d\n", sum);
	return 0;
}

//法二
int main()
{
	int n = 0;
	scanf("%d", &n);
	printf("%d", 2 * n - 1);

	return 0;
}

